Testing
This document serves as a guide for the testing practices within the gov.gr ecosystem, aimed at developers implementing and integrating solutions. It helps developers properly set up and execute testing environments for services that interact with gov.gr, offering practical steps, examples, and best practices.
Test Environment
- Use only URLs starting with
https://test.gsis.grfor alltesting. - Do not use production
credentials. - Contact KED to obtain
sandbox credentials.
Creating Test Users
- For services using
GSIS login, create users inDjango adminwithvat_number=null. - Use
mock VAT numbersfortesting(e.g.,123456789). - Ensure there are no duplicate users with the same
VAT values.
Simulating Web Service Calls
- Use
Python scriptswith therequestsandxmltodictlibraries forSOAP services. - Post to
test endpointsand checkresponsesforerrors. - Use
auditRecordeven intest calls.
Local Redirect Usage
- If you're testing
login flowslocally, add theredirect URIsto thebackend provider. - Example:
http://localhost:8000/authorizeor/admin/authorize - Also add the same
redirect URIsin your.envfile (and inAzureif deploying).
Token Behavior in Testing
Tokensin testing have short durations (e.g., 5–15 minutes).- If you encounter
401 errors, try repeating thelogin flow. - Also test the behavior when the
tokenexpires and needs to berefreshed.
Logging and Log Auditing
- Use
debug-levelloggingonly intestenvironments. - Do not log
tokensor sensitive data. - Check your
audit logsto ensure they include all required fields.
